<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="p" uri="/WEB-INF/mytag.tld" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link href="<%=path %>/resource/css/mytable.css" rel="stylesheet" type="text/css" />
<script src="<%=path %>/resource/js/jquery-1.7.2.min.js" language="javascript" ></script>
<title>无标题文档</title>
<style type="text/css">

body {
	margin-top: 0px;
	margin-bottom: 0px;
}
</style>
<script>
function refData(data){
	$("#data","#frm").html(data);
}
$(document).ready(function(){
	$("#checkAll").bind("click",function(){
		var checked=$(this).attr("checked");
		if(checked=="checked"){
			$(":checkbox","#data").each(function(){			
				$(this).attr("checked",checked=="checked");
			});
		}else{
			$(":checkbox","#data").each(function(){			
				$(this).removeAttr("checked");
			});
		}
	});
});

</script>
</head>

<body>

<form id="frm" action="<%=path %>/sys/userList.do" >
<div id="tools" style="height:30px">

<div style="float: left;">
用户名:<input type="text" id="uname" name="truename" />
<input type="button" value="查询" onclick="frmGo()" />
</div>

<div style="float: right;">
<span ><img src="<%=path %>/resource/images/001.gif" width="14" height="14" />新增</span>
<span ><img src="<%=path %>/resource/images/114.gif" width="14" height="14" />修改</span>
<span ><img src="<%=path %>/resource/images/083.gif" width="14" height="14" />删除</span>
</div>

</div>


<table class="mytable" width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="#c9c9c9">
<tr>
	<th><input type="checkbox" id="checkAll" /></th>
    <th>登录名</th>
    <th>真实姓名</th>
    <th>类型</th>
    <th>所属组</th>
    <th>游戏时间</th>
    <th>&nbsp;</th>
  </tr>
  <tbody id="data">
<c:forEach items="${ulst }" var="lst">
  <tr>
  	<th><input type="checkbox" id="checked_${lst.id }" /></th>
    <td>${lst.username }</td>
    <td>${lst.truename }</td>
    <td>${lst.type==1?'管理员':'前端用户' }</td>
    <td>${lst.groupid }</td>
    <td>${lst.gametime }/${lst.gametime }&nbsp;
    <c:if test="${lst.calctype==1}">天</c:if>
    <c:if test="${lst.calctype==2}">周</c:if>
    <c:if test="${lst.calctype==3}">月</c:if>
    </td>
    <td width="200px"><a href="#">设置游戏时间</a>|<a href="#">编辑</a>|<a href="#">删除</a></td>
  </tr>
</c:forEach>

</tbody>
</table>
<div style="float: right;" ><p:pager formid="frm" callback="refData" /></div>
</form>
</body>
</html>
